package jeecg.video;

import it.sauronsoftware.jave.Encoder;
import it.sauronsoftware.jave.MultimediaInfo;

import java.io.File;

public class ReadVideo {

    public static void main(String[] args){
        File source = new File("F:\\技术\\手机\\ios\\视频\\2 4.C语言22-预处理指令1宏定义.mp4");
        Encoder encoder = new Encoder();
        try {
             MultimediaInfo m = encoder.getInfo(source);
             long ls = m.getDuration();
             System.out.println("此视频时长为:"+ls/60000+"分"+ls%60000/1000+"秒！");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}